/* 全局样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* 根变量定义 */
:root {
    --primary-color: #ff6b6b;
    --secondary-color: #4ecdc4;
    --accent-color: #ffe66d;
    --text-primary: #2c3e50;
    --text-secondary: #7f8c8d;
    --background-light: #f8f9fa;
    --background-white: #ffffff;
    --shadow-light: 0 2px 10px rgba(0, 0, 0, 0.1);
    --shadow-medium: 0 4px 20px rgba(0, 0, 0, 0.15);
    --border-radius: 12px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 基础样式 */
body {
    font-family: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* 头部样式 */
.header {
    text-align: center;
    margin-bottom: 40px;
    padding: 40px 20px;
    background: var(--background-white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-light);
}

.title {
    font-size: 3rem;
    font-weight: 700;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 10px;
}

.subtitle {
    font-size: 1.2rem;
    color: var(--text-secondary);
    font-weight: 300;
}

/* 主内容区域 */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 40px;
}

/* 推荐按钮区域 */
.recommendation-section {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}

.recommend-btn {
    background: linear-gradient(45deg, var(--primary-color), #ff8a80);
    border: none;
    border-radius: 50px;
    padding: 20px 40px;
    font-size: 1.3rem;
    font-weight: 600;
    color: white;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--shadow-medium);
    display: flex;
    align-items: center;
    gap: 15px;
    position: relative;
    overflow: hidden;
}

.recommend-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(255, 107, 107, 0.4);
}

.recommend-btn:active {
    transform: translateY(-1px);
}

.recommend-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.recommend-btn:hover::before {
    left: 100%;
}

.btn-icon {
    font-size: 1.5rem;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

/* 菜品展示区域 */
.dish-display {
    background: var(--background-white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-light);
    overflow: hidden;
    transition: var(--transition);
}

.dish-display:hover {
    box-shadow: var(--shadow-medium);
}

.dish-card {
    display: grid;
    grid-template-columns: 1fr 2fr;
    min-height: 300px;
}

.dish-image {
    background: linear-gradient(135deg, var(--accent-color), #ffd93d);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.placeholder-image {
    font-size: 4rem;
    opacity: 0.8;
}

.dish-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.dish-info {
    padding: 30px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.dish-name {
    font-size: 2rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 15px;
}

.dish-tags {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.tag {
    background: var(--secondary-color);
    color: white;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
}

.dish-description {
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 20px;
    font-size: 1.1rem;
}

.dish-details {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.detail-item {
    display: flex;
    align-items: center;
}

.detail-label {
    font-weight: 600;
    color: var(--text-primary);
    min-width: 60px;
}

.detail-value {
    color: var(--text-secondary);
}

/* 菜系分类 */
.cuisine-categories {
    background: var(--background-white);
    border-radius: var(--border-radius);
    padding: 30px;
    box-shadow: var(--shadow-light);
}

.section-title {
    font-size: 1.8rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 25px;
    text-align: center;
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
}

.category-btn {
    background: var(--background-light);
    border: 2px solid transparent;
    border-radius: var(--border-radius);
    padding: 20px 15px;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--text-primary);
}

.category-btn:hover {
    background: var(--secondary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow-light);
}

.category-btn.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.category-icon {
    font-size: 2rem;
}

.category-name {
    font-weight: 600;
    font-size: 1.1rem;
}

/* 今日推荐 */
.daily-recommendations {
    background: var(--background-white);
    border-radius: var(--border-radius);
    padding: 30px;
    box-shadow: var(--shadow-light);
}

.recommendation-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.recommendation-card {
    background: var(--background-light);
    border-radius: var(--border-radius);
    padding: 20px;
    transition: var(--transition);
    cursor: pointer;
}

.recommendation-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-light);
}

.recommendation-card h4 {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 10px;
}

.recommendation-card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
}

/* 底部 */
.footer {
    text-align: center;
    padding: 30px 20px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
    margin-top: 40px;
}

/* 加载动画 */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.loading-overlay.show {
    display: flex;
}

.loading-spinner {
    text-align: center;
    color: white;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 点餐按钮样式 */
.order-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
    flex-wrap: wrap;
}

.order-btn, .search-btn {
    flex: 1;
    min-width: 120px;
    padding: 10px 15px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.order-btn {
    background: linear-gradient(135deg, #FF6B6B, #FF8E53);
    color: white;
}

.order-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 107, 107, 0.3);
}

.search-btn {
    background: linear-gradient(135deg, #4ECDC4, #44A08D);
    color: white;
}

.search-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(78, 205, 196, 0.3);
}

/* 收藏按钮样式 */
.favorite-btn {
    width: 100%;
    padding: 10px;
    margin-top: 10px;
    border: 2px solid #FF6B6B;
    background: transparent;
    color: #FF6B6B;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.favorite-btn:hover {
    background: #FF6B6B;
    color: white;
    transform: translateY(-1px);
}

/* 价格标签样式 */
.price-tag {
    background: linear-gradient(135deg, #FFD700, #FFA500);
    color: #333;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    display: inline-block;
}

/* 每日推荐卡片样式优化 */
.daily-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.daily-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    background: rgba(255, 255, 255, 0.95);
}

.daily-icon {
    font-size: 2.5rem;
    flex-shrink: 0;
}

.daily-content {
    flex: 1;
}

.daily-content h4 {
    margin: 0 0 5px 0;
    color: #333;
    font-size: 16px;
    font-weight: 600;
}

.daily-content p {
    margin: 0 0 8px 0;
    color: #666;
    font-size: 14px;
    line-height: 1.4;
}

/* 通知样式优化 */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: linear-gradient(135deg, #4CAF50, #45a049);
    color: white;
    padding: 15px 20px;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    z-index: 1001;
    font-size: 14px;
    font-weight: 500;
    max-width: 300px;
    opacity: 0;
    transform: translateX(100%);
    transition: all 0.3s ease;
}

.notification.show {
    opacity: 1;
    transform: translateX(0);
}

/* 响应式设计优化 */
@media (max-width: 768px) {
    .order-actions {
        flex-direction: column;
    }
    
    .order-btn, .search-btn {
        min-width: auto;
        width: 100%;
    }
    
    .daily-item {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }
    
    .daily-icon {
        font-size: 2rem;
    }
    
    .notification {
        right: 10px;
        left: 10px;
        max-width: none;
    }
}

/* 动画效果 */
.fade-in {
    animation: fadeIn 0.6s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.slide-in {
    animation: slideIn 0.8s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* 特殊效果 */
.dish-card.highlight {
    animation: highlight 1s ease-in-out;
}

@keyframes highlight {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.02);
    }
}